package com.hw.weathershow.factory.getter;

import com.hw.weathershow.factory.AbstractFactory;
import com.hw.weathershow.observer.Observer;
import com.hw.weathershow.websocket.UpdateWeatherSocket;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2022/12/6 15:59
 */
@Component
@Getter
public class UtilFactory implements AbstractFactory {
    @Autowired
    UpdateWeatherSocket updateWeatherSocket;

//    public UpdateWeatherSocket getSocket(String socket){
//        if(socket.equals("UpdateWeatherSocket"))
//            return updateWeatherSocket;
//        return null;
//    }

    @Override
    public Observer getObserver(String observer) {
        return null;
    }

//    @Bean
//    public UpdateWeatherSocket getUpdateWeatherSocket() {
//        return updateWeatherSocket;
//    }
}
